import { createBrowserRouter } from "react-router-dom";
import Chat from "../Page/Chat";
import Home from "../Page/Home";
import List from "../Page/List";

export const routes= createBrowserRouter([
    {
        path:'/',
        lazy:async()=>{
            const {default:Home}=await import('../Page/Home')
            return {element:<Home/>}
        }
    },
    {
        path:'/chat',
        lazy:async()=>{
            const {default:Chat}=await import('../Page/Chat')
            return {element:<Chat/>}
        }
    },
    {
        path:'/list',
        lazy:async()=>{
            const {default:List}=await import('../Page/List')
            return {element:<List/>}
        }
    }
])
